﻿<?php
	session_start();
	$mobile=$_POST['phone'];	
	$content="注册验证";
	$code = mt_rand(11111,66666);	
    include "alidayu/TopSdk.php";
    date_default_timezone_set('Asia/Shanghai');    
    $c = new TopClient;
	$c->appkey = "24537613";
    $c->secretKey = "2150fcf02028872f79e5721d43bc7c6c";
	$c->format = "json";
	$req = new AlibabaAliqinFcSmsNumSendRequest;
	$req->setSmsType("normal");
	$req->setSmsFreeSignName("运营公社");
	$req->setSmsParam("{\"code\":\"".$code."\",\"product\":\"LiuR_Fun\",\"item\":\"LiuR_Fun\"}");
	$req->setRecNum($mobile);
	$req->setSmsTemplateCode("SMS_76455032");
	$resp = $c->execute($req);
 
   // var_dump($resp);
    if($resp->result->success)
    {
		$_SESSION['vdcode'] = $code; 
        echo 1;
		//短信发送成功
    }
    else
    {
		echo 0;
		
        //return false;
    }

//登录的验证码模板IDSMS_76455032



